package com.eimf.saf.base.querycomm;

import java.util.ArrayList;
import java.util.List;

/**
 * @author eden
 * @date 2013-11-18 下午1:41:45
 * @Description: 对查询条件进行封装主要有三类对象：查询条件集合，排序条件集合，分页信息。
 */
public class SearchExpression
{

    private final List<Expression> expressions = new ArrayList<Expression>();

    private final List<OrderExpression> orderExpressions = new ArrayList<OrderExpression>();

    private int startRow;

    private int endRow;

    public void addExpression(final Expression ex)
    {
        expressions.add(ex);
    }

    public void addOrderExpression(final OrderExpression oex)
    {
        orderExpressions.add(oex);
    }

    public List<Expression> getExpressions()
    {
        return expressions;
    }

    public List<OrderExpression> getOrderExpressions()
    {
        return orderExpressions;
    }

    /**
     * startRow
     * 
     * @return the startRow
     * @since 1.0.0
     */

    public int getStartRow()
    {
        return startRow;
    }

    /**
     * @param startRow the startRow to set
     */
    public void setStartRow(final int startRow)
    {
        this.startRow = startRow;
    }

    /**
     * endRow
     * 
     * @return the endRow
     * @since 1.0.0
     */

    public int getEndRow()
    {
        return endRow;
    }

    /**
     * @param endRow the endRow to set
     */
    public void setEndRow(final int endRow)
    {
        this.endRow = endRow;
    }
}
